package com.victualler.core.config.permission.controller;

import com.victualler.core.base.controller.BaseRestController;
import com.victualler.core.common.dto.PageDto;
import com.victualler.core.config.permission.dto.RoleGroupDto;
import com.victualler.core.config.permission.dto.request.RoleRequestDto;
import com.victualler.core.config.permission.entity.RoleInfoDao;
import com.victualler.core.config.permission.repository.RoleInfoQueryRepository;
import com.victualler.core.config.permission.repository.RoleInfoRepository;
import com.victualler.core.config.permission.service.RoleInfoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @author: Guoshichang
 * @discription:
 */
public interface RoleInfoController  extends BaseRestController<RoleInfoDao,RoleInfoRepository,RoleInfoQueryRepository,RoleInfoService> {


    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param roleRequestDto
     * @Function  根据条件入参PermissionRequestDto动态分页查询权限
     */
    public PageDto<RoleInfoDao> getByRequestDto(RoleRequestDto roleRequestDto, int pageNo , int limit);

    /**
     * @author Guoshichang   
     * @since 23:06 on 2018/9/18.
     * @param userId 用户id
     * @return RoleGroupDto
     * @Function  获取用户对应的 角色列表和未在列的角色列表
     */
    @RequestMapping("/getByUserId")
    public RoleGroupDto getByUserId(@RequestParam("userId") Long userId);
}
